#include <stdio.h>
#include <math.h>

int sipingfanghe(int i,int var,int *ap);
//int paixu(int *ap);

int sipingfanghe(int i,int var,int *ap){
    int a = sqrt(var);
    *(ap+i)= a;
    i--;
    int b = var-a*a;
    if (!(b == 0)){
        sipingfanghe(i,b,ap);
    }

}

int main(){
    long int iv;
    int a[]={0,0,0,0};
    int along = sizeof(a[0]);
    printf("please input the value\n");
    scanf("%d",&iv);
    if (iv > 5000000 || iv < 0){
    printf("please input the right value");
    }

    sipingfanghe(3,iv,a);
    //paixu(&a);
    for(int i=0;i<4;i++){
        printf("%d ",a[i]);
    }
}